<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<title th:text="${category.cnname} + '-' + ${system.title}"></title> 
<meta name="Keywords" th:attr="content=${system.keywords}" />
<meta name="Description" th:attr="content=${system.describe}" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link th:href="@{${templatesdir}} + '/css/base.css'" rel="stylesheet">
<link th:href="@{${templatesdir}} + '/css/index.css'" rel="stylesheet">
<link th:href="@{${templatesdir}} + '/css/m.css'" rel="stylesheet">
<!--[if lt IE 9]>
<script th:src="@{${templatesdir}} + '/js/modernizr.js'"></script>
<![endif]-->
<script>
window.onload = function ()
{
	var oH2 = document.getElementsByTagName("h2")[0];
	var oUl = document.getElementsByTagName("ul")[0];
	oH2.onclick = function ()
	{
		var style = oUl.style;
		style.display = style.display == "block" ? "none" : "block";
		oH2.className = style.display == "block" ? "open" : ""
	}
}
</script>
</head>
<body>
<header th:include="${templatesdir} + '/header' :: content"></header>
<article>
  <h1 class="t_nav"><span>不要轻易放弃。学习成长的路上，我们长路漫漫，只因学无止境。 </span><a href="/" class="n1">网站首页</a><a href="/" class="n2">学无止境</a></h1>
  <div class="blogs" th:with="result = ${archives.pagelist('start=' + pageinfo['pageNum'],'length=' + pageinfo['pageSize'],'code=' + category.code)}">
    <div class="mt20"></div>
    <li th:each="item : ${result.list}">
		<span class="blogpic"><a th:href="${constant.articleurl} + ${item.aid}"><img th:src="${system.website} + ${system.uploaddir} + ${item.imagePath}" th:if="${!#strings.isEmpty(item.imagePath)}"></a></span>
        <h3 class="blogtitle"><a th:href="${constant.articleurl} + ${item.aid}" th:text="${item.title}"></a></h3>
        <div class="bloginfo">
       		<p th:text="${item.description}"></p>
        </div>
        <div class="autor">
        	<span class="lm"><a th:href="${constant.articleurl} + ${item.aid}" th:title="${item['tag']}" target="_blank" class="classname" th:text="${item['tag']}"></a></span>
	      	<span class="dtime" th:text="${#dates.format(item.createTime, 'yyyy-MM-dd')}">2018-05-04</span>
	      	<span class="viewnum">浏览（<a href="/" th:text="${item.clicks}">0</a>）</span>
	      	<span class="readmore"><a th:href="${constant.articleurl} + ${item.aid}">阅读原文</a></span>
        </div>
    </li>
    <div class="empty" th:if="${#lists.isEmpty(result.list)}">暂无数据！</div>
    <div class="pagelist" th:if="${!#lists.isEmpty(result.list)}">
    	<a th:href="@{${currentURI}(typeid=${category.id},pageNum=${result.navigateFirstPage},pageSize=${result.pageSize})}" title="首页" th:class="${result.isFirstPage} ? 'paginationNotAllowed' : ''">首页</a>
        <a th:href="@{${currentURI}(typeid=${category.id},pageNum=${result.prePage},pageSize=${result.pageSize})}" title="上一页">上一页</a>
        <a th:each="pageinfo : ${result.navigatepageNums}" th:href="@{${currentURI}(typeid=${category.id},pageNum=${pageinfo},pageSize=${result.pageSize})}" th:class="${pageinfo == result.pageNum} ? 'paginationActive' : ''" th:text="${pageinfo}"></a>
        <a th:href="@{${currentURI}(typeid=${category.id},pageNum=${result.nextPage},pageSize=${result.pageSize})}" title="下一页">下一页</a>
        <a th:href="@{${currentURI}(typeid=${category.id},pageNum=${result.navigateLastPage},pageSize=${result.pageSize})}" title="未页" th:class="${result.isLastPage} ? 'paginationNotAllowed' : ''">尾页</a>
    </div>
  </div>
  <div class="sidebar" th:include="${templatesdir} + '/right2' :: content"></div>
</article>
<footer th:include="${templatesdir} + '/footer' :: content"></footer>
<script th:src="@{${templatesdir}} + '/js/nav.js'"></script>
</body>
</html>
